package org.vison.wonfu.framework.soa.protocol;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class ParamsHandlerFactory {

    private static final Map<Protocol, ParamsHandler> paramsHandlerMap = new ConcurrentHashMap<>();

    public static void register(Protocol protocol, ParamsHandler paramsHandler) {
        paramsHandlerMap.put(protocol, paramsHandler);
    }

    public static ParamsHandler getParamsHandler(Protocol protocol) {
        return paramsHandlerMap.get(protocol);
    }
}
